package com.njwt.cloud.mseureka.config;


import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;

/**
 * @author <a href="mailto:xingxiao@gtmap.cn">xingxiaofeng</a>
 * @version2.1 2022-04-19
 * @description
 */
@EnableWebSecurity
public class WebSecurityConfig  extends WebSecurityConfigurerAdapter {

    /***
     * 重写方法
     */
    @Override
    protected void configure(HttpSecurity http) throws Exception {
        //禁用csrf攻击功能
        //http.csrf().disable();
        http.csrf().ignoringAntMatchers("/eureka/**");
        super.configure(http);
    }

}
